import {AddNodeBtnClassName, DelNodeBtnClassName} from '../constant/index'
import {createNodeObj} from '../vnode'


export const createMapNode = (msg, left, top) => {
    let node = document.createElement('div')
    node.className = 'emm-node'
    node.style.cssText = `left:${left}px;top:${top}px`
    node.innerHTML = `<section class="emm-node-text">${msg}</section><button class="${AddNodeBtnClassName}">+</button><button class="${DelNodeBtnClassName}">x</button>`
    return createNodeObj(node)
}

export const createSlider = () => {
    let node = document.createElement('div')
    node.className = 'emm-slider'
    node.innerHTML = `<em class="emm-slider-line"></em><div class="emm-slider-btn"></div>`
    return node
}



